Creation of objects in the script

One can add new objects into a report by using the script. Let us demonstrate with a simple example, how it is performed. Create a blank report, and then write in the main script’s procedure:

var
Band: TfrxReportTitle;
Memo: TfrxMemoView;
begin
Band := TfrxReportTitle.Create(Page1);
Band.Height := 20;
Memo := TfrxMemoView.Create(Band);
Memo.SetBounds(10, 0, 100, 20);
Memo.Text := 'This memo is created in code';
end.

Start a report:

Note, that we never destroy the created objects in these examples. It is not required, since objects are automatically destroyed after the report is completed.